package com.gangzi.liteormbyrxjava;

import android.app.Application;

import com.litesuits.orm.LiteOrm;

/**
 * Created by 岗子博 on 2017/1/13.
 */
public class MyApplication extends Application {
    private static LiteOrm liteOrm;

    @Override
    public void onCreate() {
        super.onCreate();
        initLiteOrm();
    }

    /**
     * 初始化LiteOrm
     */
    private void initLiteOrm() {
        if (liteOrm == null) {
            liteOrm = LiteOrm.newSingleInstance(this, "liteorm.db");
        }
        liteOrm.setDebugged(true);
    }

    public static LiteOrm getLiteOrm() {
        return liteOrm;
    }
}
